package com.xt.LibaryDeskManager.service;

import com.xt.LibaryDeskManager.dto.MessageDto;
import com.xt.LibaryDeskManager.vo.MessageVo;

import java.util.List;
import java.util.Map;

public interface MessageService {
    /**
     * 获取公告总数量
     * @return
     * @throws Exception
     */
    int getCount() throws Exception;

    /**
     * 获取所有公告
     * @return
     * @throws Exception
     */
    Map getAllMessage(Integer page, Integer limit) throws Exception;

    /**
     * 删除公告
     * @param mid
     * @return
     * @throws Exception
     */
    int deleteMessage(int mid)throws Exception;

    /**
     * 更新公告
     * @param messageVo
     * @return
     * @throws Exception
     */
    int updateMessage(MessageVo messageVo)throws Exception;

    /**
     * 添加公告
     * @param messageVo
     * @return
     * @throws Exception
     */
    int addMessage(MessageVo messageVo)throws Exception;
}
